using Conusic;
using NUnit.Framework;

namespace ConusicTests
{
    [TestFixture()]
    public class HashDecoder
    {
        [Test()]
        public void TestExample()
        {
            Assert.AreEqual("6b32074d7d8d8179f1", VkontakteWallPost.ConvertHashToPostFormat("dd798d8d7d47023b68621f971"));
        }

        [Test()]
        public void TestExample3()
        {
            Assert.AreEqual("39fa101cb025f62331", VkontakteWallPost.ConvertHashToPostFormat("f3b5f520bc101af93e1513326"));
        }

        // New HTML5 way to generate signature test
        [Test()]
        public void CheckNewSignature()
        {
          //  var dataUrl =
         //       "iVBORw0KGgoAAAANSUhEUgAAAkoAAAElCAYAAAAbac2LAAAEpklEQVR4nO3dsWuUSRgHYOGKQMDCys7iyEEKxcvOxBSxE+zsTiwEwejOrEUEOyHFVekOAhGy8yqBFAeChZW1hXDdgcWBf4+Fubsm6pLs7qzheeDtv5nqx/e+M3PhAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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